<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript">
	$(function() {
		// CKEditor
		/* CKEDITOR.replace( 'ckeditor', {
			height: 200
		});
		CKEDITOR.on('instanceReady', function (e){
			modal.centerModal();
		}) */
		
		var id="${course.id}";
		if(id!=""&&id!=null) {
			$("#courseType").val("${course.type}");
		}
	})
	
	function selectUser(id, name) {
		$("#userId").val(id);
		$("#userName").val(name);
	}
</script>
<div class="columns">
	<div class="new-row-mobile six-columns six-columns-tablet six-columns-mobile">
		<form id="course-form">
			<input type="hidden" name="course.id" value="${course.id }">
			
			<h3 class="thin underline">课程信息</h3>
			<p class="inline-label button-height">
				<label class="label">课程名称：</label>
				<input type="text" name="course.name" class="input" value="${course.name }">
			</p>
			<p class="inline-label button-height">
				<label class="label">课程类别：</label>
				<select id="courseType" name="course.type" class="select">
					<option value="">--请选择--</option>
					<c:forEach items="${types }" var="type">
						<option value="${type.value }">${type.name }</option>
					</c:forEach>
				</select>
			</p>
			<p class="inline-label button-height">
				<label class="label">学时：</label>
				<input type="text" name="course.time" class="input" value="${course.time }">
			</p>
			<p class="inline-label button-height">
				<label class="label">学分：</label>
				<input type="text" name="course.score" class="input" value="${course.score }">
			</p>
			<p class="inline-label button-height">
				<label class="label">课程负责人：</label>
				<input id="userName" readonly="readonly" type="text" class="input" value="${course.user_name }">
				<input id="userId" type="hidden" name="course.user_id" value="${course.user_id }">
			<p/>
			<p class="inline-label button-height">
				<label class="label">课程简介：</label>
				<textarea name="course.desc" class="input full-width autoexpanding">${course.desc }</textarea>
			</p>
			<p class="inline-label button-height">
				<label class="label">教学大纲：</label>
				<textarea name="course.outline" class="input full-width autoexpanding">${course.outline }</textarea>
			</p>
		</form>
	</div>
	<div class="new-row-mobile six-columns six-columns-tablet six-columns-mobile">
		<div id="user-div">
			<jsp:include page="user_table.jsp"/>
		</div>
	</div>
</div>
    